package muobject;

import java.util.Calendar;

import org.springframework.context.ApplicationContext;

public class SystemProperty {
	
	private ApplicationContext springConnector;
	private String rootPath;
	private String imagePath;
	private String templatePath;
	private String dbPath;
	private String sno;
	private String year;
	private String grade;
	private String sclass;
	private String currentYear;
	
	public SystemProperty(ApplicationContext springConnector, String rootPath,
			String imagePath, String templatePath, String dbPath, String sno,
			String year, String grade, String sclass) {
		super();
		Calendar calendar = Calendar.getInstance();
		this.springConnector = springConnector;
		this.rootPath = rootPath;
		this.imagePath = imagePath;
		this.templatePath = templatePath;
		this.dbPath = dbPath;
		this.sno = sno;
		this.year = year;
		this.grade = grade;
		this.sclass = sclass;
		if(calendar.get(Calendar.MONTH)<8){
			this.currentYear = String.valueOf(calendar.get(Calendar.YEAR)-1);
		}else{
			this.currentYear = String.valueOf(calendar.get(Calendar.YEAR));
		}
	}

	public ApplicationContext getSpringConnector() {
		return springConnector;
	}

	public void setSpringConnector(ApplicationContext springConnector) {
		this.springConnector = springConnector;
	}

	public String getRootPath() {
		return rootPath;
	}

	public void setRootPath(String rootPath) {
		this.rootPath = rootPath;
	}

	public String getImagePath() {
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

	public String getTemplatePath() {
		return templatePath;
	}

	public void setTemplatePath(String templatePath) {
		this.templatePath = templatePath;
	}

	public String getDbPath() {
		return dbPath;
	}

	public void setDbPath(String dbPath) {
		this.dbPath = dbPath;
	}

	public String getSno() {
		return sno;
	}

	public void setSno(String sno) {
		this.sno = sno;
	}

	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public String getGrade() {
		return grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	public String getSclass() {
		return sclass;
	}

	public void setSclass(String sclass) {
		this.sclass = sclass;
	}

	public String getCurrentYear() {
		return currentYear;
	}

	public void setCurrentYear(String currentYear) {
		this.currentYear = currentYear;
	}
}
